str = input("请输入一个字符串：")

char = 0
number = 0
space = 0
others = 0

for i in str:
    if i.isalpha():
        char += 1
    elif i.isdigit():
        number += 1
    elif i.isspace():
        space += 1
    else:
        others += 1

print("字母：%d" % char)
print("数字：%d" % number)
print("空格：%d" % space)
print("其他：%d" % others)
